package com.ht.impl.demo;

import com.ht.memcached.MemCachedConfigurator;
import com.ht.memcached.MemCachedOpt;

/**
 * Created by IntelliJ IDEA.
 *
 * @author Wang Jiaxiang
 *         Date: 2011-4-6
 */
public class MemDataMaker {
    public static void main(String[] args) {
        MemCachedConfigurator.config(new String[]{"127.0.0.1:11211"}, new Integer[]{1});
        int i=0;
        while(true) {
            if(i>65530)
                i=0;
            MemCachedOpt.set("test_1", i%2);
            MemCachedOpt.set("123_2", Math.random()*10);
            try {
                Thread.sleep(1000);
            } catch (InterruptedException e) {
                e.printStackTrace();
            }
            i ++;
        }
    }
}
